"""
Before running codeql_adapter module, you should copy the following items to /src/codeql_adapter/config.py.
Unless all the value of items set properly, the module can't work.
"""

from dataclasses import dataclass


codeql_database="D:/Code/doctor/data/py150kdb/test"
code_source="D:/Code/doctor/data/py150ksource/test"
dataset_dir=['D:/Code/doctor/data/py150k/test']
caches_path="temp/caches_test.pickle"
query_dir="result/test"
output_dir='output/test'
output_baseFileName='py150k_test_'
output_batch=500
rebuild_caches=True
codeql_path="codeql"
codeql_database_dir="D:/Code/doctor/data/py150kdb"


caches_include_viewer=False
caches_include_addon=False

index_path='index/index_test.json'
source_prefix='D:/Code/doctor/data'
codeql_prefix='D:/Code/doctor/data'

clear_memory=True

test_find_func=""
remove_decorator=False
exclude_function_name=["genexpr","listcomp","dictcomp"]
no_effect_scope_name=["genexpr","listcomp","dictcomp"]
exclude_variable_name=["None","True","False"]



"""
Before running tasks module, you should copy the class Py150kvarmisuseTaskConfig to /src/tasks/config.
Unless all the properties of class set properly, the module can't work.
"""
@dataclass
class Py150kvarmisuseTaskConfig:

        
    # 任务相关
    output_model="vm"
    max_variable_candidates=256
    
    # 输出相关
    result_dir="models/gtcn"

    # 读取模型、继续训练
    load_model_file=None
    #load_model_file', type=str, default="trained_models/model_save/Single-Task_2022-05-07-18-27-35_26536_resgagn_best_model", help='')

    # 模型训练
    backbone_model="tensor_gcn"
    optimizer="Adam"
    lr=0.001
    lr_deduce_per_epoch=10
    max_epochs=1500
    cur_epoch=1
    batch_size=128
    dropout_rate=0.
    h_features=128
    out_features=128
    graph_node_max_num_chars=19
    max_node_per_graph=50
    device="cuda"


    # 数据集相关
    slice_edge_type="[0,1,2,3,4,5,6,7,8]"
    num_edge_types=3
    train_data_dir="/mnt/XiaoweiGuo/data/py150.varmisuse/train"
    validate_data_dir="/mnt/XiaoweiGuo/data/py150.varmisuse/eval"
    dataset_name="py"
    vocab_dict_path="vocab.txt"
    type_dict_dir=""
    dataset_num_workers=0
    # 其他参数设置
    seed=42
    slot_singal="<SLOT>"
    max_graph=100000
    notes=""